Auto merge of #2420 - alexcrichton:different-metadata, r=brson
authorbors <bors@rust-lang.org>
Wed, 9 Mar 2016 21:05:23 +0000 (13:05 -0800)
committerbors <bors@rust-lang.org>
Wed, 9 Mar 2016 21:05:23 +0000 (13:05 -0800)
Ensure metadata for libs/bins are distinct

It may be the case in the future that the compiler will require that the "salt"
(the `-C metadata` flag) for all crates with the same name are distinct. Right
now a Cargo project with a library and a binary, however, will have the same
salt with the same crate name.

This commit mixes in some extra data to the library's salt to ensure that its
symbols don't clash with the binary's.

1  2 
src/cargo/util/toml.rs

Simple merge